<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: red;
        }

        .box1 {
            width: 100px;
            height: 100px;
            background-color: green;
        }
    </style>
</head>

<body>
    <!-- <div id="app">
        {{ message }}
    </div> -->
    <!-- <div id="app" v-html="context"></div> -->
    <!-- <div id="app" v-text="context"></div> -->
    <div id="app">

        <!-- <div v-show="flex">haihahii</div>
        <div v-if="true">ssss</div> -->
        <button @click="message+=1">{{ message }}</button>
        <button @click="fn">{{ message }}</button>
        <a href="https://www.baidu.com" @click="fn(10,$event)">{{ message }}</a>
        <img :src="src" alt="" @click="fn1">
        <div class="box" :class="{'box1':flex}" @click="flex=!flex"></div>
        <div :style="{'backgroundColor': color}">444</div>
    </div>



    <!-- 引入vue.js -->
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                message: 'Hello Vue!',
                color: 'yellow',
                context: '<span>This is a span tag</span>',
                flex: false,
                src1: 'https://img10.360buyimg.com/img/jfs/t1/243758/14/21012/14218/670a74a7Fcfdd9aa4/6a035c24557c5c02.png',
                src: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png'
            },
            methods: {
                fn(num, e) {
                    e.preventDefault()
                    this.message = 'hello'
                },
                fn1() {
                    this.src = "https://img10.360buyimg.com/img/jfs/t1/243758/14/21012/14218/670a74a7Fcfdd9aa4/6a035c24557c5c02.png"
                }

            }
        })
    </script>
</body>

</html>